$(function(){

	$(document).on('click','.message-reply',function(){
		 alert("对不起！暂未开放此功能");
	});

		// 删除留言
	$(document).on('click','.message-del',function(){
		var $tr = $(this).parents('tr');
		var id = $tr.attr('data-id');
		layer.confirm('确认删除？', {
		  	btn: ['是的','取消'] //按钮
		}, function(){
			var param = {
				id: id
			};
			$.ajax({
				url: '/phone/index.php/Admin/Message/messageDelete',
				type: 'POST',
				dataType: 'json',
				data: param,
				success: function(data){
					console.log(data);
					if(data.code == 0){
						layer.msg('删除成功', {icon: 1});
						$tr.remove();
					}
				},
				error: function(xhr){
					console.log(xhr);
				}
			});
		  	
		}, function(){
		  	//layer.msg('取消');
		});
	});
});